home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / psgrind.man < prev    next >
Encoding:
Text File  |  1990-03-12  |  7.9 KB  |  265 lines

  1.  
  2.  
  3.  
  4. PSGRIND                   User Commands                   PSGRIND
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      psgrind - convert C source files to POSTSCRIPT format for
  10.      printing
  11.  
  12. SSYYNNOOPPSSIISS
  13.      ppssggrriinndd [ _o_p_t_i_o_n_s ] [ _f_i_l_e_s ]
  14.  
  15. DDEESSCCRRIIPPTTIIOONN
  16.      _p_s_g_r_i_n_d reads in C source files, converts them to POSTSCRIPT
  17.      format, and spools them for printing on a POSTSCRIPT
  18.      printer.  The different fonts used for the different syntac-
  19.      tic elements of C source code may be specified on the com-
  20.      mand line.  _P_s_g_r_i_n_d is also much faster than any other grind
  21.      program since it outputs a direct printer language without
  22.      going through a normal document formatter as other pretty
  23.      source printers must.
  24.  
  25.      The five syntactic categories that _p_s_g_r_i_n_d recognizes and
  26.      displays in different ways are page headings (which are
  27.      actually not part of the C source code), the ``body'' or
  28.      main text, keywords, which are C reserved words, literal
  29.      strings and comments.  Normally, the heading and keywords
  30.      are set in a bold Helvetica font, the comments in a slanted
  31.      Helvetica font, the body in a normal Helvetica font and
  32.      literal strings and character constants in Courier font.
  33.  
  34.      All the above fonts may be changed, see the --HH, --BB, --KK, --LL
  35.      and --CC options.  All these options take as their argument a
  36.      font specfication.  These font specifications have two
  37.      parts: A font name as known to POSTSCRIPT (e.g., Times-
  38.      Roman, Times-BoldItalic, Helvetica, Courier), and a point
  39.      size (1 point = 1/72 inch-8 point is a good small font).  So
  40.      ``Courier-Bold8'' is 8 point Courier Bold, ``Helvetica12''
  41.      is 12 point Helvetica.
  42.  
  43.      The environment variable PSGRIND may be used to specify
  44.      defaults.  The value of PSGRIND is parsed as a string of
  45.      arguments _b_e_f_o_r_e the arguments that appear on the command
  46.      line.  For example setting the environment variable PSGRIND
  47.      to the string ``-B Times-Roman12'' sets your default body
  48.      font to 12 point Times Roman.
  49.  
  50.      The possible options are:
  51.  
  52.      --22   Sets two column mode.
  53.  
  54.      --11   Force one column mode.
  55.  
  56.      --gg   Causes the fact that a file is garbage to be ignored.
  57.           Normally, any file with more than a small number of
  58.           non-printing characters is suspected of being garbage,
  59.           and not printed-this option means ``print it anyway.''
  60.  
  61.  
  62.  
  63. Sprite v1.0                                                     1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PSGRIND                   User Commands                   PSGRIND
  71.  
  72.  
  73.  
  74.      --oo   If _p_s_g_r_i_n_d cannot find characters in a font, the miss-
  75.           ing characters are listed.
  76.  
  77.      --pp _f_i_l_e
  78.           Causes the POSTSCRIPT file to be written to the named
  79.           file rather than being spooled for printing.  As a spe-
  80.           cial case, --pp -- will send the POSTSCRIPT to the stan-
  81.           dard output.
  82.  
  83.      --rr   Causes the output to be rotated 90 degrees on the page
  84.           (landscape mode).  This is good for output that
  85.           requires a wide page or for program listings when used
  86.           in conjunction with two column mode.  ``psgrind -2r
  87.           _f_i_l_e_s'' is a nice way to get program listings.
  88.  
  89.      --RR   Force portrait (non-rotated) mode.
  90.  
  91.      --kk   Enable page prefeed (if the printer supports it).  This
  92.           allows simple documents (e.g., program listings in one
  93.           font) to print somewhat faster by keeping the printer
  94.           running between pages.
  95.  
  96.      --ss _p_a_g_e_s_p_e_c
  97.           Allows you to specify a range (or several ranges) of
  98.           pages to be printed.  _P_a_g_e_s_p_e_c is a string, not con-
  99.           taining spaces, of the form ``pagerange[,pagespec]''.
  100.           _P_a_g_e_r_a_n_g_e may be a single page number or a range of the
  101.           form ``N-M'' which means print pages N through M.  -N
  102.           means print from the beginning of the docment to page
  103.           N. M- means print from page M to the end of the docu-
  104.           ment.
  105.  
  106.      --HH _f_o_n_t
  107.           This allows the respecification of the font used to
  108.           print running titles listing the source file name and
  109.           current page number.  The option argument to --HH, and
  110.           the other font options, should be a font specification
  111.           as described above.
  112.  
  113.      --BB _f_o_n_t
  114.           This allows one to respecify the font to be used for
  115.           the main body of the source, that not set specially in
  116.           another font.
  117.  
  118.      --KK _f_o_n_t
  119.           This option allows the respecification of the font used
  120.           to show keywords as separate from normal body text.
  121.  
  122.      --LL _f_o_n_t
  123.           This option allows the respecification of the font used
  124.           to show string and character constants (literals)
  125.           separate from normal body text.
  126.  
  127.  
  128.  
  129. Sprite v1.0                                                     2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PSGRIND                   User Commands                   PSGRIND
  137.  
  138.  
  139.  
  140.      --CC _f_o_n_t
  141.           This option respecifies the font used to print comment
  142.           text to show its separateness from normal text.
  143.  
  144.      The following options are passed on as is to _l_p_r.
  145.  
  146.      --PP_p_r_i_n_t_e_r
  147.           Causes the output to be sent to the named printer.
  148.  
  149.      --##_n  Causes n copies of the output to be produced.  The
  150.           default is one.
  151.  
  152.      --mm   Causes the printer daemon to send mail upon job comple-
  153.           tion.
  154.  
  155.      --hh   Suppress the printing of the burst page.
  156.  
  157.      --JJ _n_a_m_e
  158.           Set the job name for use on the burst page.  Otherwise,
  159.           the name of the first input file will be used.
  160.  
  161. EENNVVIIRROONNMMEENNTT
  162.      PSGRIND
  163.           string of options to be used by _p_s_g_r_i_n_d.
  164.  
  165.      METRICS
  166.           path name of a directory to use instead of /usr/lib/ps
  167.           for font metric files.
  168.  
  169.      PRINTER
  170.           the name of a printer (as in the --PP option) for _l_p_r to
  171.           use.  If no --PP option is specified, _l_p_r will use this
  172.           printer.  If --PP is not specified and PRINTER is not
  173.           defined in the environment, _p_s_g_r_i_n_d will spool to a
  174.           printer named ``PostScript''.
  175.  
  176. FFIILLEESS
  177.      /usr/local/lib/ps/*.afm
  178.                            font metrics files.
  179.  
  180.      /usr/local/lib/ps/psgrind.pro
  181.                            prologue for _p_s_g_r_i_n_d POSTSCRIPT files.
  182.  
  183.      lpr                   Printer spooler
  184.  
  185. SSEEEE AALLSSOO
  186.      enscript(1), lpr(1)
  187.  
  188. AAUUTTHHOORR
  189.      John Coker,
  190.      University of California, Berkeley
  191.      This code is based on the _e_n_s_c_r_i_p_t utility from Adobe
  192.  
  193.  
  194.  
  195. Sprite v1.0                                                     3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. PSGRIND                   User Commands                   PSGRIND
  203.  
  204.  
  205.  
  206.      Systems, Inc.
  207.  
  208. BBUUGGSS
  209.      If you give the --pp argument after the file to be converted,
  210.      _p_s_g_r_i_n_d will lie and tell you that the file has been put in
  211.      the right place, when in fact it is in some obscure tem-
  212.      porary file.  Always give the --pp argument first.
  213.  
  214.      Long lines are not truncated in 2 column mode.  Line trunca-
  215.      tion may be off by a little bit as printer margins vary.
  216.      There should be a ``wrap'' option and multiple (truncated or
  217.      wrapped) columns.
  218.  
  219.      _P_s_g_r_i_n_d generates temporary files which are spooled for
  220.      printing.  The temporary file names are used by the spooling
  221.      software (e.g., _l_p_q), rather than the symbolic job name
  222.      passed to _l_p_r.
  223.  
  224. NNOOTTEESS
  225.      POSTSCRIPT is a trademark of Adobe Systems, Incorporated.
  226.      Times is a trademark of Allied Corporation.
  227.      Helvetica is a registered trademark of Allied Corporation.
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. Sprite v1.0                                                     4
  262.  
  263.  
  264.  
  265.